## Test writing stub elf when symbol table contains no non-local symbol.

# RUN: llvm-ifs --output-elf=%t %s
# RUN: llvm-readobj -S %t | FileCheck %s -DCLASS="64-bit (0x2)" -DDE="LittleEndian (0x1)" -DHS=64 -DPHES=56 -DSHES=64 -DDYNSYMAL=8 -DDYNSYMES=24 -DDYNAMICAL=8 -DDYNAMICES=16 -DDYNTABZ=000000000

--- !ifs-v1
IfsVersion: 3.0
Target: { ObjectFormat: ELF, Arch: x86_64, Endianness: little, BitWidth: 64 }
NeededLibs:
  - libc.so.6
Symbols: []
...

# CHECK:      Section {
# CHECK-NEXT:   Index: 0
# CHECK-NEXT:   Name:  (0)
# CHECK-NEXT:   Type: SHT_NULL
# CHECK-NEXT:   Flags [
# CHECK-NEXT:   ]
# CHECK-NEXT:   Address: 0x0
# CHECK-NEXT:   Offset: 0x0
# CHECK-NEXT:   Size: 0
# CHECK-NEXT:   Link: 0
# CHECK-NEXT:   Info: 0
# CHECK-NEXT:   AddressAlignment: 0
# CHECK-NEXT:   EntrySize: 0
# CHECK-NEXT: }
# CHECK-NEXT: Section {
# CHECK-NEXT:   Index: 1
# CHECK-NEXT:   Name: .dynsym
# CHECK-NEXT:   Type: SHT_DYNSYM
# CHECK-NEXT:   Flags [
# CHECK-NEXT:     SHF_ALLOC
# CHECK-NEXT:   ]
# CHECK-NEXT:   Address:
# CHECK-NEXT:   Offset:
# CHECK-NEXT:   Size:
# CHECK-NEXT:   Link: 2
# CHECK-NEXT:   Info: 1
# CHECK-NEXT:   AddressAlignment: [[DYNSYMAL]]
# CHECK-NEXT:   EntrySize: [[DYNSYMES]]
# CHECK-NEXT: }
# CHECK-NEXT: Section {
# CHECK-NEXT:   Index: 2
# CHECK-NEXT:   Name: .dynstr
# CHECK-NEXT:   Type: SHT_STRTAB
# CHECK-NEXT:   Flags [
# CHECK-NEXT:     SHF_ALLOC
# CHECK-NEXT:   ]
# CHECK-NEXT:   Address:
# CHECK-NEXT:   Offset:
# CHECK-NEXT:   Size:
# CHECK-NEXT:   Link: 0
# CHECK-NEXT:   Info: 0
# CHECK-NEXT:   AddressAlignment: 1
# CHECK-NEXT:   EntrySize: 0
# CHECK-NEXT: }
# CHECK-NEXT: Section {
# CHECK-NEXT:   Index: 3
# CHECK-NEXT:   Name: .dynamic
# CHECK-NEXT:   Type: SHT_DYNAMIC
# CHECK-NEXT:   Flags [
# CHECK-NEXT:     SHF_ALLOC
# CHECK-NEXT:   ]
# CHECK-NEXT:   Address:
# CHECK-NEXT:   Offset:
# CHECK-NEXT:   Size:
# CHECK-NEXT:   Link: 2
# CHECK-NEXT:   Info: 0
# CHECK-NEXT:   AddressAlignment: [[DYNAMICAL]]
# CHECK-NEXT:   EntrySize: [[DYNAMICES]]
# CHECK-NEXT: }
# CHECK-NEXT: Section {
# CHECK-NEXT:   Index: 4
# CHECK-NEXT:   Name: .shstrtab
# CHECK-NEXT:   Type: SHT_STRTAB
# CHECK-NEXT:   Flags [
# CHECK-NEXT:   ]
# CHECK-NEXT:   Address:
# CHECK-NEXT:   Offset:
# CHECK-NEXT:   Size:
# CHECK-NEXT:   Link: 0
# CHECK-NEXT:   Info: 0
# CHECK-NEXT:   AddressAlignment: 1
# CHECK-NEXT:   EntrySize: 0
# CHECK-NEXT: }
